<extend name="Public/base"/>
<block name="body">
    <div class="portlet box blue">
        <div class="portlet-title">
            <div class="caption"><i class="fa fa-reorder"></i>新增年级</div>
            <div class="tools">
                <a href="" class="collapse"></a><a href="" class="remove"></a>
            </div>
        </div>
        <div class="portlet-body form">
            <form class="class-form-g" action="{:U('')}" method="post">
                <div class="form-body">
                    <div class="form-group">
                        <label>年级名称<span class="check-tips">（格式为：20xx）</span></label>
                        <input type="text" class="form-control input-xlarge" name="class_name" placeholder="请输入年级名称">

                    </div>
                </div>
                <div class="form-body">
                    <div class="form-group">
                        <label>负责人</label>
                        <select onchange="fun_prin(this)" name="uid" class="form-control input-xlarge">
                            <option value="">请选择</option>
                            <volist name="_list" id="vo">
                                <option value="{$vo.uid}">{$vo.nickname}</option>
                            </volist>
                        </select>
                    </div>
                </div>
                <input type="hidden" value="" name="principal" />
                <div class="form-actions fluid">
                    <div class="col-md-offset-4 col-md-8">
                        <button type="submit" target-form="class-form-g" class="ajax-post btn green">确定</button>
                        <button type="button" class="btn default">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>


</block>
<block name="script">
    <script src="__STATIC__/scripts/app.js"></script>
    <script>
        jQuery(document).ready(function() {
            App.init();
            highlight_subnav('{:U('User/gradeInformation')}');

        });
        function fun_prin(that){
            var nickname= $(that).find("option:selected").text();
            $("[name='principal']").val(nickname)
        }

    </script>
</block>